package com.king.config

/**
 * @Author: KingWang
 * @Date: 2022/1/15  
 * @Desc: 状态后端
 **/
object StateBackendConfig {

  private val flinkCheckpoints = "/flinkCheckpoints"
  private val flinkSavepoints = "/flinkSavepoints"

  private val hdfsCheckPointDir = "hdfs://ns1/flink/job/"
  private val hdfsSavePointDir = "hdfs://ns1/flink/job/"
  private val fileCheckPointDir:String = "file:///d://tmp/flink/job/"
  private val fileSavePointDir = "file:///d://tmp/flink/job/"

  def getHdfsCheckPointDir(jobName:String):String = {
    hdfsCheckPointDir + jobName + flinkCheckpoints
  }

  def getHdfsSavePointDir(jobName:String):String = {
    hdfsSavePointDir + jobName + flinkSavepoints
  }

  def getFileCheckPointDir(jobName:String):String = {
    fileCheckPointDir + jobName +flinkCheckpoints
  }

  def getFileSavePointDir(jobName:String):String = {
    fileSavePointDir + jobName +flinkSavepoints
  }

  def main(args: Array[String]): Unit = {
    println(getFileCheckPointDir("BaseDBApp"))
  }

}
